Crossterm Windows API Abstractions
This crate provides some wrappers aground common used WinAPI functions.
The purpose of this library is originally meant for the crossterm, but could be used apart from it. Although, notice that it unstable right because some changes to the API could be expected.
Features
This crate provides some abstractions over reading input, console screen buffer, and handle.
The following WinAPI calls:
- CONSOLE_SCREEN_BUFFER_INFO (used to extract information like cursor pos, terminal size etc.)
- HANDLE (the handle needed to run functions from WinAPI)
- SetConsoleActiveScreenBuffer (activate an other screen buffer)
- Set/GetConsoleMode (e.g. console modes like disabling output)
- SetConsoleTextAttribute (eg. coloring)
- SetConsoleWindowInfo (changing the buffer location e.g. scrolling)
- FillConsoleOutputAttribute, FillConsoleOutputCharacter (used to replace some block of cells with a color or character.)
- SetConsoleInfo
- ReadConsoleW
- Semaphore object handling
Example
The examples repository has more complete and verbose examples.
Screen buffer information
use ;
Handle
use ;